body{
  padding: 0;
  height: 100%;
  color: #333;
  font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,SimSun,sans-serif;
  -webkit-font-smoothing: antialiased;
}
p, body, h1, h2, h3, h4, h5{
  margin: 0
}
ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

html{
  height: 100%;

}
.line {
  width: 100%;
  height: 1px;
  background-color: rgba(0, 0, 0, .1);
}

input {
  cursor: pointer;
}

body .hljs {
  line-height: 1.8;
  font-family: Menlo, Monaco, Consolas, Courier, monospace;
  font-size: 12px;
  padding: 18px 24px;
  background-color: #fafafa;
  border: 1px solid #eaeefb;
  margin-bottom: 25px;
  border-radius: 4px;
  -webkit-font-smoothing: auto
}

h2,h3,h4,h5 {
  font-weight: normal;
  color: #333;
}

h3 {
  font-size: 22px;
  margin: 50px 0 20px;
}

h4 {
  margin: 20px 0;
  font-size: 18px;
}

p {
  line-height: 1.5;
  margin: 10px 0;
  font-weight: normal;
  font-size: 14px;
  color: #5e6d82;
}

a {
  color: #409eff;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  width: 100%;
  background-color: #fff;
  font-size: 14px;
  margin-bottom: 45px;
  line-height: 1.5em;

  th {
    white-space: nowrap;
    text-align: left;
    color: #666;
    font-weight: 400;
  }

  th,
  td {
    border-bottom: 1px solid #d8d8d8;
    padding: 15px;
    max-width: 250px;
  }

  td {
    color: #333;
  }
}

.demo-material {
  padding-top: 30px;
}
.t-c{
  text-align: center;
}
.tip {
  padding: 8px 16px;
  background-color: #ecf8ff;
  border-radius: 4px;
  border-left: 5px solid #50bfff;
  margin: 20px 0;
}

.block {
  padding: 30px 24px;
  overflow: hidden;
  border-bottom: 1px solid #eff2f6;
}

@widthList: 10, 20, 30, 40, 50, 60,100,200,300,400,500;
@heightList: 10, 20, 30, 40, 50, 60;
@fontList: 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30;
@spacingList: 5, 10, 15, 20, 25, 30, 35, 40, 45, 60;
@directionShort: l, r, t, b;
@direction: left, right, top, bottom;

.generWidth(@i) when (@i < length(@widthList)+1) {
  //循环遍历
  .widths(extract(@widthList, @i)); //extract(数组，编号)   
  .generWidth(@i+1);
}

.widths(@size) {
  .w-@{size} {
    width: unit(@size, px);
  }
}

.generFont(@i) when (@i < length(@fontList)+1) {
  //循环遍历
  .fonts(extract(@fontList, @i)); //extract(数组，编号)   
  .generFont(@i+1);
}

.fonts(@size) {
  .font-@{size} {
    font-size: unit(@size, px) !important;
  }
}

.generHeight(@i) when (@i < length(@heightList)+1) {
  .heights(extract(@heightList, @i));
  .generHeight(@i+1);
}

.heights(@size) {
  .h-@{size} {
    height: unit(@size, px) !important;
  }
}

.generSpacingDirection(@j, @i) when (@j < length(@direction)+1) {
  .spacing(extract(@directionShort, @j), extract(@direction, @j), extract(@spacingList, @i));
  .generSpacingDirection(@j+1, @i);
}

.generSpacing(@i) when (@i < length(@spacingList)+1) {
  .spacingUnit(extract(@spacingList, @i));
  .generSpacingDirection(1, @i);
  .generSpacing(@i+1);
}

.spacingUnit(@size) {
  .p-@{size} {
    padding: unit(@size, px);
  }

  .px-@{size} {
    padding-left: unit(@size, px);
    padding-right: unit(@size, px);
  }

  .py-@{size} {
    padding-top: unit(@size, px);
    padding-bottom: unit(@size, px);
  }

  .m-@{size} {
    margin: unit(@size, px);
  }

  .mx-@{size} {
    margin-left: unit(@size, px);
    margin-right: unit(@size, px);
  }

  .my-@{size} {
    margin-top: unit(@size, px);
    margin-bottom: unit(@size, px);
  }
}

.spacing(@directionShort, @direction, @size) {
  .p@{directionShort}-@{size} {
    padding-@{direction}: unit(@size, px);
  }

  .m@{directionShort}-@{size} {
    margin-@{direction}: unit(@size, px);
  }
}

body {
  .generWidth(1);
  .generHeight(1);
  .generSpacing(1);
  .generFont(1);
}


.max640 {
  max-width: 640px;
  margin: auto;
}